<template>
    <panel title="添加账号">
        <account-from @success="success"></account-from>
    </panel>
</template>

<script>
import AccountFrom from "../account/components/AccountFrom.vue";
import {userAddReq} from '../../api/account.api.js'
export default {
  data() {
    return {};
  },
  components: {
    AccountFrom
  },
  methods: {
    success(form) {
      console.log(form);
      //   发起请求
      userAddReq(form).then(res => {
        if (res.data.code === 0) {
          this.$message.success("添加成功");
          this.$router.push("/account/accountlist");
        }
      });
    }
  }
};
</script>

<style lang="less" scoped>
</style>